package net.towee.client.event.core;

import net.towee.model.group.GroupData;

import com.google.gwt.event.shared.GwtEvent;

public class GroupUpdatedEvent extends GwtEvent<GroupUpdateHandler> {
	public static Type<GroupUpdateHandler> TYPE = new Type<GroupUpdateHandler>();
	private final GroupData group;
	
	public GroupUpdatedEvent(GroupData group) {
		this.group = group;
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<GroupUpdateHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(GroupUpdateHandler handler) {
		handler.onGroupUpdated(group);
	}

}
